package ${package}.${moduleName}.controller;

import io.swagger.v3.oas.annotations.Operation;
import cn.com.pg.instore.core.common.dto.PageDto;
import cn.com.pg.instore.core.config.PgResponse;
import ${package}.${moduleName}.service.api.query.${ClassName}Query;
import ${package}.${moduleName}.service.api.dto.${ClassName}Dto;
import cn.com.pg.instore.core.common.dto.PageDto;
import cn.com.pg.instore.core.common.dto.ResponseBean;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;
import org.springframework.cloud.openfeign.SpringQueryMap;

import javax.validation.Valid;
import java.util.List;

/**
* <p>
* ${tableComment}
* </p>
* @author ${author}
* @since ${date}
*/
@Component
public interface ${ClassName}Client {

    @GetMapping("page")
    @Operation(summary = "分页")
    ResponseBean<PageDto<${ClassName}Dto>> page(@SpringQueryMap ${ClassName}Query query);

    @GetMapping("{id}")
    @Operation(summary = "信息")
    ResponseBean<${ClassName}Dto> get${ClassName}ById(@PathVariable("id") String id);

    @PostMapping
    @Operation(summary = "保存")
    ResponseBean<Boolean> save(@RequestBody ${ClassName}Dto dto);

    @PutMapping
    @Operation(summary = "修改")
    ResponseBean<Boolean> update(@RequestBody @Valid ${ClassName}Dto dto);

    @DeleteMapping
    @Operation(summary = "删除")
    ResponseBean<Boolean> deleteByIds(@RequestBody List<String> idList);
}